<template>
	<view>
		<view class='content'>
			<u-parse :content="content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: '',
			}
		},
		onLoad(options) {
			if(typeof(options.id) !== 'undefined'){
				this.request.get(`api/contents/${options.id}`).then((res) => {
					this.content = res.data.content
					uni.setNavigationBarTitle({
						title: res.data.title
					})
				})
			}
		},
		methods: {
			
		}
	}
</script>

<style>
	.content{
		padding: 20px 10px;
	}
</style>